package com.icart.entities;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

@Entity
@Table(name = "fi_prepayfee", schema = "amp", catalog = "")
public class FiPrepayfeeEntity {
    private String prefeeid;
    private String sourceid;
    private Long custid;
    private String cautname;
    private String carno;
    private Long cardid;
    private Long tcid;
    private String tradekind;
    private Timestamp tradedate;
    private BigDecimal tradefee;
    private BigDecimal balance;
    private Long doman;

    @Id
    @Column(name = "prefeeid")
    public String getPrefeeid() {
        return prefeeid;
    }

    public void setPrefeeid(String prefeeid) {
        this.prefeeid = prefeeid;
    }

    @Basic
    @Column(name = "sourceid")
    public String getSourceid() {
        return sourceid;
    }

    public void setSourceid(String sourceid) {
        this.sourceid = sourceid;
    }

    @Basic
    @Column(name = "custid")
    public Long getCustid() {
        return custid;
    }

    public void setCustid(Long custid) {
        this.custid = custid;
    }

    @Basic
    @Column(name = "cautname")
    public String getCautname() {
        return cautname;
    }

    public void setCautname(String cautname) {
        this.cautname = cautname;
    }

    @Basic
    @Column(name = "carno")
    public String getCarno() {
        return carno;
    }

    public void setCarno(String carno) {
        this.carno = carno;
    }

    @Basic
    @Column(name = "cardid")
    public Long getCardid() {
        return cardid;
    }

    public void setCardid(Long cardid) {
        this.cardid = cardid;
    }

    @Basic
    @Column(name = "tcid")
    public Long getTcid() {
        return tcid;
    }

    public void setTcid(Long tcid) {
        this.tcid = tcid;
    }

    @Basic
    @Column(name = "tradekind")
    public String getTradekind() {
        return tradekind;
    }

    public void setTradekind(String tradekind) {
        this.tradekind = tradekind;
    }

    @Basic
    @Column(name = "tradedate")
    public Timestamp getTradedate() {
        return tradedate;
    }

    public void setTradedate(Timestamp tradedate) {
        this.tradedate = tradedate;
    }

    @Basic
    @Column(name = "tradefee")
    public BigDecimal getTradefee() {
        return tradefee;
    }

    public void setTradefee(BigDecimal tradefee) {
        this.tradefee = tradefee;
    }

    @Basic
    @Column(name = "balance")
    public BigDecimal getBalance() {
        return balance;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    @Basic
    @Column(name = "doman")
    public Long getDoman() {
        return doman;
    }

    public void setDoman(Long doman) {
        this.doman = doman;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        FiPrepayfeeEntity that = (FiPrepayfeeEntity) o;

        if (prefeeid != null ? !prefeeid.equals(that.prefeeid) : that.prefeeid != null) return false;
        if (sourceid != null ? !sourceid.equals(that.sourceid) : that.sourceid != null) return false;
        if (custid != null ? !custid.equals(that.custid) : that.custid != null) return false;
        if (cautname != null ? !cautname.equals(that.cautname) : that.cautname != null) return false;
        if (carno != null ? !carno.equals(that.carno) : that.carno != null) return false;
        if (cardid != null ? !cardid.equals(that.cardid) : that.cardid != null) return false;
        if (tcid != null ? !tcid.equals(that.tcid) : that.tcid != null) return false;
        if (tradekind != null ? !tradekind.equals(that.tradekind) : that.tradekind != null) return false;
        if (tradedate != null ? !tradedate.equals(that.tradedate) : that.tradedate != null) return false;
        if (tradefee != null ? !tradefee.equals(that.tradefee) : that.tradefee != null) return false;
        if (balance != null ? !balance.equals(that.balance) : that.balance != null) return false;
        if (doman != null ? !doman.equals(that.doman) : that.doman != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = prefeeid != null ? prefeeid.hashCode() : 0;
        result = 31 * result + (sourceid != null ? sourceid.hashCode() : 0);
        result = 31 * result + (custid != null ? custid.hashCode() : 0);
        result = 31 * result + (cautname != null ? cautname.hashCode() : 0);
        result = 31 * result + (carno != null ? carno.hashCode() : 0);
        result = 31 * result + (cardid != null ? cardid.hashCode() : 0);
        result = 31 * result + (tcid != null ? tcid.hashCode() : 0);
        result = 31 * result + (tradekind != null ? tradekind.hashCode() : 0);
        result = 31 * result + (tradedate != null ? tradedate.hashCode() : 0);
        result = 31 * result + (tradefee != null ? tradefee.hashCode() : 0);
        result = 31 * result + (balance != null ? balance.hashCode() : 0);
        result = 31 * result + (doman != null ? doman.hashCode() : 0);
        return result;
    }
}
